import request from "@/utils/request";
import requestMd5 from "@/utils/requestMd5";

export function cycle_add(data) {
  return request({
    url: "/cycle/add",
    method: "post",
    data: data
  });
}

export function cycle_edit(data) {
  return request({
    url: "/cycle/edit",
    method: "post",
    data: data
  });
}

export function cycle_members(params) {
  return request({
    url: "/cycle/members",
    method: "get",
    params
  });
}

export function cycle_index(params) {
  return request({
    url: "/cycle/index",
    method: "get",
    params
  });
}

export function cycle_delete(data) {
  return request({
    url: "/cycle/delete",
    method: "post",
    data: data
  });
}

export function cycle_cancel(data) {
  return request({
    url: "/cycle/cancel",
    method: "post",
    data: data
  });
}

export function cycle_info(params) {
  return request({
    url: "/cycle/info",
    method: "get",
    params
  });
}

export function cycle_copyList(params) {
  return request({
    url: "/cycle/copyList",
    method: "get",
    params
  });
}

export function cycle_delList(data) {
  return request({
    url: "/cycle/delList",
    method: "post",
    data: data
  });
}

export function cycle_getGoodsSpu(params) {
  return request({
    url: "/cycle/getGoodsSpu",
    method: "get",
    params
  });
}

// 同步

export function cycle_synchronousOrder(data) {
  return request({
    url: "/cycle/synchronousOrder",
    method: "post",
    data: data
  });
}

export function user_import_model(params) {
  return request({
    url: "/user_cycle_export/cycle_dowm",
    method: "get",
    responseType: "blob",
    params
  });
}

export function cycle_export(params) {
  return requestMd5({
    url: "/cycle/cycle_export",
    method: "get",
    responseType: "blob",
    params
  });
}
